﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace MDM.GUI
{
    //OpenDialog(modName: string)
    //tra ve: UpdateModuleList();
    public partial class UninstallForm : DevExpress.XtraEditors.XtraForm
    {
        int c;
        public UninstallForm(int inumberfile)
        {
            InitializeComponent();
            c = inumberfile;
            progressBarControl1.Properties.Maximum = c;
            Timer time = new Timer();
            time.Interval = 10;
            time.Start();
            time.Tick += new EventHandler(UninstallForm_Load);
        }

        private void btnStop_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        private void UninstallForm_Load(object sender, EventArgs e)
        {
            if (c >= 0)
            {
                c--;
                progressBarControl1.Position += 1;
                if (progressBarControl1.Position == progressBarControl1.Properties.Maximum)
                {
                    btnStop.Enabled = true;
                }
            }
        }

        private void UninstallForm_Load_1(object sender, EventArgs e)
        {

        }
    }
}